#include "CollectableAI.h"

namespace PeanutQuest {

	CollectableAI::CollectableAI() {
		_axesScale = 1.0;
		_position.set(0,0,0);
		_front.set(1,0,0);
		_up.set(0,1,0);
		_right.set(0,0,1);
	}

	CollectableAI::~CollectableAI() {
	}
	cg::Vector3d CollectableAI::getPosition() {	return _position; }

	void CollectableAI::setPosition(double x, double y, double z) {
		_position.set(x,y,z);
	}

	void CollectableAI::applyTransforms() {
        glTranslated(_position[0],_position[1],_position[2]);
		//glMultMatrixd(_rotationMatrix);
	}

	void CollectableAI::setAxesScale(double scale) {
		_axesScale = scale;
	}
	void CollectableAI::drawAxes() {
		glPushMatrix();
			glTranslated(_position[0],_position[1],_position[2]);
			glScaled(_axesScale,_axesScale,_axesScale);
			glColor3f(1.0f,0.0f,0.0f);
			glBegin(GL_LINES);
				glVertex3f(0.0f,0.0f,0.0f);
				glVertex3d(_front[0],_front[1],_front[2]);
			glEnd();
			glColor3f(0.0f,1.0f,0.0f);
			glBegin(GL_LINES);
				glVertex3d(0.0,0.0,0.0);
				glVertex3d(_up[0],_up[1],_up[2]);
			glEnd();
			glColor3f(0.0f,0.0f,1.0f);
			glBegin(GL_LINES);
				glVertex3d(0.0,0.0,0.0);
				glVertex3d(_right[0],_right[1],_right[2]);
			glEnd();
		glPopMatrix();
	}

}